/**
 * Date:2018年7月25日上午9:11:55
 *
 */

package com.xue.common.util;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * Description: 获取ApplicationContext <br/>
 * Date: 2018年7月25日 上午9:11:55 <br/>
 * 
 * @author xuejianxin
 */
@Component
public class SpringContext implements ApplicationContextAware {
	private static ApplicationContext context = null;

	@Override
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		context = applicationContext;
	}

	public static ApplicationContext get() {
		return context;
	}

}
